package com.CGFrame.Axis;


//import java.io.FileOutputStream;

import org.jdom.Document;
import org.jdom.output.XMLOutputter;

public  class XMLOut {
	
	
	public static String outputToString(Document document)
	{
//	  ByteArrayOutputStream byteRep=new ByteArrayOutputStream();
	  XMLOutputter docWriter=new XMLOutputter(null,true,"UTF8");
	  docWriter.setEncoding("UTF8");
	  try
	  {
		//  docWriter.output(document,new   FileOutputStream("d:/data.xml"));   
		//  docWriter.output(document,System.out);
		  return docWriter.outputString(document);	  	
	  }
	  catch(Exception e)
	  {
	  	System.out.println(e.toString());
	  	return null;
	  }
	  
 	}
}
